import QtQuick
import QtQuick.Controls
import Qt5Compat.GraphicalEffects


Item {
    width: 1080
    height: 80

    Rectangle{
        id:bottomBack
        anchors.fill: parent
        // color: "transparent"
        color: "blue"
        border.width: 1
        border.color: "black"
    }

    A_IconButton{       // 关机按钮
        id:powerOffButon
        anchors.verticalCenter: bottomBack.verticalCenter
        anchors.left: bottomBack.left
        buttonWidth: 100
        buttonHeight: 80
        buttonText: qsTr("关机")
        imagePath: "qrc:/Icons/Images/poweroff.png"

        onButtonClicked: {
            console.log("关机")
        }

    }

    A_IconButton{       // 手动加工按钮
        id:manualButton
        anchors.verticalCenter: bottomBack.verticalCenter
        anchors.left: bottomBack.left
        anchors.leftMargin: 100
        buttonWidth: 140
        buttonHeight: 80
        buttonText: qsTr("手动")
        coloroverlayEnable : true
        imagePath: "qrc:/Icons/Images/manual.png"

        onButtonClicked: {
            console.log("手动界面切换")
            manualButton.backColor = "gold"
            extraLongButton.backColor = "white"
            extraShortButton.backColor = "white"
            orderprocessButton.backColor = "white"
            cornerButton.backColor = "white"
            debugButton.backColor = "white"
            parameterButton.backColor = "white"

            mauanlProcessWindow.visible = true
            extraLongProcessWindow.visible = false
            extraShortProcessWindow.visible = false
            orderProcessWindow.visible = false
            cornerProcessWindow.visible = false
            debugWindow.visible = false
            parameterWindow.visible = false
        }
    }

    A_IconButton{       // 超长加工按钮
        id:extraLongButton
        anchors.verticalCenter: bottomBack.verticalCenter
        anchors.left: bottomBack.left
        anchors.leftMargin: 240
        buttonWidth: 140
        buttonHeight: 80
        buttonText: qsTr("超长")
        coloroverlayEnable : true
        imagePath: "qrc:/Icons/Images/manual.png"

        onButtonClicked: {
            console.log("超长加工界面")
            manualButton.backColor = "white"
            extraLongButton.backColor = "gold"
            extraShortButton.backColor = "white"
            orderprocessButton.backColor = "white"
            cornerButton.backColor = "white"
            debugButton.backColor = "white"
            parameterButton.backColor = "white"

            mauanlProcessWindow.visible = false
            extraLongProcessWindow.visible = true
            extraShortProcessWindow.visible = false
            orderProcessWindow.visible = false
            cornerProcessWindow.visible = false
            debugWindow.visible = false
            parameterWindow.visible = false
        }
    }

    A_IconButton{           // 超短加工按钮
        id:extraShortButton
        anchors.verticalCenter: bottomBack.verticalCenter
        anchors.left: bottomBack.left
        anchors.leftMargin: 380
        buttonWidth: 140
        buttonHeight: 80
        buttonText: qsTr("超短")
        coloroverlayEnable : true
        imagePath: "qrc:/Icons/Images/manual.png"

        onButtonClicked: {
            console.log("超短加工界面")
            manualButton.backColor = "white"
            extraLongButton.backColor = "white"
            extraShortButton.backColor = "gold"
            orderprocessButton.backColor = "white"
            cornerButton.backColor = "white"
            debugButton.backColor = "white"
            parameterButton.backColor = "white"

            mauanlProcessWindow.visible = false
            extraLongProcessWindow.visible = false
            extraShortProcessWindow.visible = true
            orderProcessWindow.visible = false
            cornerProcessWindow.visible = false
            debugWindow.visible = false
            parameterWindow.visible = false

        }

    }

    A_IconButton{           // 排料加工按钮
        id:orderprocessButton
        anchors.verticalCenter: bottomBack.verticalCenter
        anchors.left: bottomBack.left
        anchors.leftMargin: 520
        buttonWidth: 140
        buttonHeight: 80
        buttonText: qsTr("排料")
        coloroverlayEnable : true
        imagePath: "qrc:/Icons/Images/manual.png"

        onButtonClicked: {
            console.log("排料加工界面")
            manualButton.backColor = "white"
            extraLongButton.backColor = "white"
            extraShortButton.backColor = "white"
            orderprocessButton.backColor = "gold"
            cornerButton.backColor = "white"
            debugButton.backColor = "white"
            parameterButton.backColor = "white"

            mauanlProcessWindow.visible = false
            extraLongProcessWindow.visible = false
            extraShortProcessWindow.visible = false
            orderProcessWindow.visible = true
            cornerProcessWindow.visible = false
            debugWindow.visible = false
            parameterWindow.visible = false
        }

    }

    A_IconButton{           // 角码加工界面
        id:cornerButton
        anchors.verticalCenter: bottomBack.verticalCenter
        anchors.left: bottomBack.left
        anchors.leftMargin: 660
        buttonWidth: 140
        buttonHeight: 80
        buttonText: qsTr("角码")
        coloroverlayEnable : true
        imagePath: "qrc:/Icons/Images/manual.png"

        onButtonClicked: {
            console.log("角码加工界面")
            manualButton.backColor = "white"
            extraLongButton.backColor = "white"
            extraShortButton.backColor = "white"
            orderprocessButton.backColor = "white"
            cornerButton.backColor = "gold"
            debugButton.backColor = "white"
            parameterButton.backColor = "white"

            mauanlProcessWindow.visible = false
            extraLongProcessWindow.visible = false
            extraShortProcessWindow.visible = false
            orderProcessWindow.visible = false
            cornerProcessWindow.visible = true
            debugWindow.visible = false
            parameterWindow.visible = false
        }

    }

    A_IconButton{           // 调试界面
        id:debugButton
        anchors.verticalCenter: bottomBack.verticalCenter
        anchors.left: bottomBack.left
        anchors.leftMargin: 800
        buttonWidth: 140
        buttonHeight: 80
        buttonText: qsTr("调试")
        coloroverlayEnable : true
        imagePath: "qrc:/Icons/Images/manual.png"

        onButtonClicked: {
            console.log("调试界面")
            manualButton.backColor = "white"
            extraLongButton.backColor = "white"
            extraShortButton.backColor = "white"
            orderprocessButton.backColor = "white"
            cornerButton.backColor = "white"
            debugButton.backColor = "gold"
            parameterButton.backColor = "white"

            mauanlProcessWindow.visible = false
            extraLongProcessWindow.visible = false
            extraShortProcessWindow.visible = false
            orderProcessWindow.visible = false
            cornerProcessWindow.visible = false
            debugWindow.visible = true
            parameterWindow.visible = false
        }

    }

    A_IconButton{           // 参数设置界面
        id:parameterButton
        anchors.verticalCenter: bottomBack.verticalCenter
        anchors.left: bottomBack.left
        anchors.leftMargin: 940
        buttonWidth: 140
        buttonHeight: 80
        buttonText: qsTr("参数")
        coloroverlayEnable : true
        imagePath: "qrc:/Icons/Images/manual.png"

        onButtonClicked: {
            console.log("参数设置界面")
            manualButton.backColor = "white"
            extraLongButton.backColor = "white"
            extraShortButton.backColor = "white"
            orderprocessButton.backColor = "white"
            cornerButton.backColor = "white"
            debugButton.backColor = "white"
            parameterButton.backColor = "gold"

            mauanlProcessWindow.visible = false
            extraLongProcessWindow.visible = false
            extraShortProcessWindow.visible = false
            orderProcessWindow.visible = false
            cornerProcessWindow.visible = false
            debugWindow.visible = false
            parameterWindow.visible = true
        }

    }

}
